# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Geoffroy Carrier <geoffroy.carrier@koon.fr>
# Contributor: Dalius <dagis@takas.lt>

pkgname=wmctrl
pkgver=1.07
pkgrel=6
pkgdesc="Control your EWMH compliant window manager from command line"
url="http://tripie.sweb.cz/utils/wmctrl/"
arch=('loong64' 'x86_64')
license=('GPL')
depends=(glib2 libxmu)
source=(http://tripie.sweb.cz/utils/wmctrl/dist/$pkgname-$pkgver.tar.gz
        http://archive.debian.org/debian/pool/main/w/wmctrl/wmctrl_$pkgver-6.diff.gz)
sha512sums=('4c77ad1e204e8d444f682ad1d05c0993bcab9097ac6d4b6a944556ab85acbe713f549dbaf443cd4d1226a162ce7d46fbd209c92652e87fc8e609feee74907daa'
            'e57102db253cd1e61eb341f4cb35b71d6055073339114befd5db59bc7f93bd412cebafe72870d8ff0d6a386b569404b6d8ec2c1931bfe8f99f96873ae6492002')

prepare() {
  cd $pkgname-$pkgver
  patch -p1 -i "$srcdir/wmctrl_$pkgver-6.diff"
}

build() {
  cd $pkgname-$pkgver
  ./configure --bindir="$pkgdir/usr/bin" --mandir="$pkgdir/usr/share/man"
  make
}

package() {
  cd $pkgname-$pkgver
  make install
}
